import Taro, { Component } from '@tarojs/taro'
import { View, Text, Picker,Image } from '@tarojs/components'
import './chatpages.css'
import { AtDivider, AtAvatar, AtList, AtListItem, AtInput, AtForm, AtButton, AtGrid } from "taro-ui"
import app from '../../../main.js'


export default class Index extends Component {

  config = {
    navigationBarTitleText: '周星星'
  }

  gotopatientdetails(){
    app.redirectTo('../patientdetails/patientdetails')
  }

  render () {
    return (
      <View className='index'>

        <AtListItem className='atlist' title='当前患者为付费随访' extraText='赠送免费追问包'  arrow='right'/>
        
        <AtDivider className='divider'  content='第一次咨询' fontColor='#8e8e8e' lineColor='#8e8e8e' />  
        <View className='time'> 2019-03-04 15:34 </View>

        <Form className='from'>
        <AtAvatar className='img' image={app.imageUri+'img/touxiang.jpg'} />       
        <View className='textview'>
        <Text className='text'>医生，我眼睛看不见了。。。</Text>
        </View>
        <AtAvatar className='img-a' image={app.imageUri+'img/touxiang.jpg'} />       
        <View className='textview-a'>
        <Text className='text'>白内障摘除术后随访计划</Text>
        <Image className='img-b' src={app.getPath(app.imageUri+'img/picture.jpg')} />
        <View className='box'>
        <Text className='text-a'>我给你定制了一个随访计划，请遵照计划中提醒的内容来执行。</Text>
        </View>
        <AtListItem className='atlist-a' extraText='查看详情'  arrow='right'/>
        </View>
        </Form>    

        <View className='box-a'>
        <AtDivider className='divider'  content='第二次咨询' fontColor='#8e8e8e' lineColor='#8e8e8e' />  
        <View className='time'> 2019-03-05 17:34 </View>   
        </View>     
        
        <Form className='from'>
        <AtAvatar className='img-d' image={app.imageUri+'img/touxiang.jpg'} />       
        <View className='textview-d'>
        <Text className='text'>请尽快回院复查</Text>
        </View>
        <AtAvatar className='img-c' image={app.imageUri+'img/touxiang.jpg'} />       
        <View className='textview-c'>
        <Image className='img-e' src={app.getPath(app.imageUri+'img/picture.jpg')} />
        </View>
        </Form>    

        <View className='box-a'>
        <AtDivider className='divider'  content='咨询结束，感谢您的专业解答' fontColor='#8e8e8e' lineColor='#8e8e8e' />   
        </View>

        <View class='emptybox'></View>

        <View className='btnctro'>
        <AtButton  className='redbtn' type='primary' size='small' onClick={this.gotopatientdetails.bind(this)}>查看病例</AtButton>
        <AtButton  className='greenbtn' type='primary' size='small'>结束会话</AtButton>
        </View>

      </View>
    )
  }
}

